/**
 * 待审核表单列配置
 */
import { AUDIT_STATUS } from '@/enum/user'
export default {
  data() {
    return {
      checkPendingColums: [
        {
          label: '营业执照',
          render(h, { row }) {
            return (
              <div>
                {row.licenseImg ? (
                  <el-image
                    src={row.licenseImg}
                    preview-src-list={[row.licenseImg]}
                    style="width: 80px;height: 40px"
                  />
                ) : (
                  ''
                )}
              </div>
            )
          }
        },
        { prop: 'touchMobile', label: '联系电话' },
        { prop: 'applyTime', label: '申请时间' },
        {
          label: '审核状态',
          prop: 'verifyStatus',
          render: (h, { row }) => {
            const color = `color:${row.verifyStatus !== 2 ? '#333' : '#fc4e66'}`
            return (
              <div>
                <p style={color}>{AUDIT_STATUS[row.verifyStatus]}</p>
                {row.auditStatus == 2 ? (
                  <el-popover placement="left" title="驳回理由" width="300" trigger="click">
                    <div style="padding:10px;border-bottom:1px solid #eee">{row.verifyReason}</div>
                    <div class="flex mt-5">
                      <p>操作员:{row.failInfo.operator}</p>
                      <p class="ml-5">时间:{row.failInfo.handleTime}</p>
                    </div>
                    <p style="color:#2a94f4;cursor: pointer;" slot="reference">
                      查看理由
                    </p>
                  </el-popover>
                ) : (
                  ''
                )}
              </div>
            )
          }
        },
        {
          label: '操作',
          render: (h, { row }) => {
            return (
              <p
                style="color:#4c8bfa;cursor: pointer;text-decoration: underline;"
                onClick={() => this.auditInfo(row)}
              >
                {row.verifyStatus === 1 ? '审核' : '重审'}
              </p>
            )
          }
        }
      ]
    }
  }
}
